import QtQuick 1.1
import com.nokia.meego 1.0


QueryDialog{
    id: messageBox

    property string type : "Question"

    signal acceptedClicked

    titleText: if (type=="Error"){
                   qsTr("Ooops!")
               }
               else{
                   qsTr("Hey!")
               }

    icon: if (type=="Error"){
              "qrc:/images/error.png"
          }
          else{
              "qrc:/images/pitanje.png"
          }

    acceptButtonText: if (type=="Error"){
                          ""
                      }
                      else{
                          qsTr("Yes")
                      }

    rejectButtonText: if (type == "Error"){
                          qsTr("OK")
                      } else {
                          qsTr("No")
                      }

    onAccepted:  {
        acceptedClicked()
        messageBox.destroy()
    }
    onRejected: {
        //rejectedClicked()
        messageBox.destroy()
        console.log("rejection")
    }


}
